home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6251 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: How to the size of a file in C ?
  5. Date: Mon, 12 Feb 96 21:39:02 GMT
  6. Organization: none
  7. Message-ID: <824161142snz@genesis.demon.co.uk>
  8. References: <4ffeqa$pjh@brtph500.bnr.ca> <4ffs5g$a71@kryten.awinc.com> <4fh4qe$487@kryten.awinc.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4fh4qe$487@kryten.awinc.com>
  15.            jenna.design@awinc.com "jenna design" writes:
  16.  
  17. >Thanks to Darrell Grainger for pointing out a pitfall in the
  18. >above code.
  19. >The above function is fairly useless on 16 bit computers
  20. >as if the returned value exceeds the maximum value a long
  21. >variable can hold the variable will overflow.
  22. >
  23. >in 16-bit LONG_MAX is defined as 32767
  24.  
  25. No. INT_MAX may be that small but the C language requires that LONG_MAX
  26. to be at least 2147483647 so in most cases it works fine.
  27.  
  28. -- 
  29. -----------------------------------------
  30. Lawrence Kirby | fred@genesis.demon.co.uk
  31. Wilts, England | 70734.126@compuserve.com
  32. -----------------------------------------
  33.